Containers in Cisco IOS-XE, IOS-XR, and NX-OS: Orchestration and Operation by Nagendra Kumar Nainar & Yogesh Ramdoss
Author:Nagendra Kumar Nainar & Yogesh Ramdoss [Nagendra Kumar Nainar]
Language: eng
Format: epub
Publisher: Cisco Press
Published: 2020-07-30T16:00:00+00:00
Building an RPM File for Native Hosting
The management tools used by the operators vary for each network depending on the use case or the specific problem they are trying to solve. It is hard to identify all the RPM files that are readily available in the repository for installation. When the required RPM binary file for any specific application or tool is not available in the repository, you can use the SDK tools to build and convert the application into an RPM file that can be natively installed.
This section discusses the steps to build an RPM package and install it natively in the Cisco IOS-XR platform.
The WRL environment in the Cisco IOS-XR platform is not natively enabled with SDK to build the RPM, so you need to set up an external environment to build the package. Several approaches are possible to set up the build environment as below:
• Launch a WRL virtual machine from the ISO image using KVM or Virsh.
• Launch the cross-built SDK from Cisco Devhub.
The cross-built SDK is a package that is readily available in Cisco Devhub with all the libraries and binaries installed to build the package in any Linux environment such as Ubuntu. Accordingly, it is the most preferable option when compared to launching the native WRL virtual machine.
Install the SDK and get the build environment ready, as shown in Example 6-15.
Example 6-15 Installing the SDK
root@nsoserver:~# root@nsoserver:~# wget https://devhub.cisco.com/artifactory/xr600/app-dev-sdk/x86_64/wrlinux-7.0.0.2-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh --2019-10-05 12:59:41-- https://devhub.cisco.com/artifactory/xr600/app-dev-sdk/x86_64/wrlinux-7.0.0.2-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh Resolving devhub.cisco.com (devhub.cisco.com)... 52.73.133.198, 3.225.96.245 Connecting to devhub.cisco.com (devhub.cisco.com)|52.73.133.198|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1430886577 (1.3G) [text/x-script.sh] Saving to: ‘wrlinux-7.0.0.2-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh’ wrlinux-7.0.0.2-glibc-x86_64-intel_x 100%[=====================================================================>] 1.33G 2.41MB/s in 7m 27s 2019-10-05 13:07:08 (3.06 MB/s) - ‘wrlinux-7.0.0.2-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh’ saved [1430886577/1430886577] root@nsoserver:~# ./wrlinux-7.0.0.2-glibc-x86_64-intel_x86_64-wrlinux-image-glibc-std-sdk.sh Enter target directory for SDK (default: /opt/windriver/wrlinux/7.0-intel-x86-64): /home/ubuntu/ The directory "/home/ubuntu" already contains a SDK for this architecture. If you continue, existing files will be overwritten! Proceed[y/N]?y Extracting SDK... root@nsoserver:~#
With these steps completed, the SDK is installed and ready to be used. Building the RPM package requires the following:
• RPM Spec file: Specifications to build the package
• Application file: The application that should be built as a package
The application can be custom-built by the operator, or it can be downloaded from any public repository. A plethora of network opensource tools can be downloaded and used, or the application can be tailored to fit the operator’s requirement.
A sample RPM spec file for the iPerf application is shown in Example 6-16.
Example 6-16 RPM Spec File
Name: iperf Version: x.x.x Release: XR_6.5.2 License: Copyright (c) 2015 Cisco Systems Inc. All rights reserved. Packager: cisco SOURCE0 : %{name}-%{version}-source.tar.gz Group: 3rd party application Summary: iperf compiled for CiscoPress %description This is a compiled version of iPerf for CiscoPress book %prep %setup -q -n %{name}-%{version} %build ./configure make %install mkdir -p %{buildroot}%{_sbindir} install -m755 src/iperf %{buildroot}%{_sbindir} %files %defattr(-,root,root) %{_sbindir}/iperf %clean rm -rf %{buildroot}
Note: If you are interested in learning more about RPM spec file creation or if you need any clarity, please refer to http://ftp.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html.
Build the application as an RPM package by running the following command:
root@nsoserver:~# rpmbuild -ba iperf.spec
The
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7810)
Grails in Action by Glen Smith Peter Ledbrook(7719)
Configuring Windows Server Hybrid Advanced Services Exam Ref AZ-801 by Chris Gill(6860)
Azure Containers Explained by Wesley Haakman & Richard Hooper(6860)
Running Windows Containers on AWS by Marcio Morales(6386)
Kotlin in Action by Dmitry Jemerov(5092)
Microsoft 365 Identity and Services Exam Guide MS-100 by Aaron Guilmette(5080)
Combating Crime on the Dark Web by Nearchos Nearchou(4656)
Microsoft Cybersecurity Architect Exam Ref SC-100 by Dwayne Natwick(4640)
Management Strategies for the Cloud Revolution: How Cloud Computing Is Transforming Business and Why You Can't Afford to Be Left Behind by Charles Babcock(4438)
The Ruby Workshop by Akshat Paul Peter Philips Dániel Szabó and Cheyne Wallace(4345)
The Age of Surveillance Capitalism by Shoshana Zuboff(3983)
Python for Security and Networking - Third Edition by José Manuel Ortega(3903)
The Ultimate Docker Container Book by Schenker Gabriel N.;(3567)
Learn Wireshark by Lisa Bock(3550)
Learn Windows PowerShell in a Month of Lunches by Don Jones(3530)
Mastering Python for Networking and Security by José Manuel Ortega(3376)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3358)
Blockchain Basics by Daniel Drescher(3329)
